#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<stdio.h>
#include<iomanip>
using namespace std;
#define N 10
#include<string>
int  main()
{
	int i, j, y[N][N];
	cout << endl;
	for (i = 0; i < N; i++)
	{
		y[i][0] = 1;
		y[i][i] = 1;
	}
	for (i = 2; i < N; i++)
		for (j = 1; j < i; j++)
			y[i][j] = y[i - 1][j - 1] + y[i - 1][j];
	int k, countk = N;
	for (i = 0; i < N; i++)
	{
		for (j = 0; j <= i; j++)
		{
			cout << setw(6);
			cout << y[i][j];
		}
		countk--;
			cout << endl;
	}
	return 0;
}